<template>
  <p>count:{{ count }} - doubleCount:{{ doubleCount }}-message:{{ message }}</p>
  <el-button @click="increment" type="primary">Increment</el-button>
  <hr />
  <p>state:{{ state }} - isReady:{{ isReady }} - isLoading:{{ isLoading }}</p>
</template>

<script setup>
import axios from 'axios'
import { useGlobalState } from '../store'
const { count, message, doubleCount, increment } = useGlobalState()
import { useAsyncState } from '@vueuse/core'
const { state, isReady, isLoading } = useAsyncState(
  axios.get('https://jsonplaceholder.typicode.com/todos/1').then((t) => t.data),
  { id: null }
)
</script>

<style lang="scss" scoped></style>
